#include<stdio.h>
#include<string.h>

int main()
{

  FILE *fp = fopen("log.txt","a");
  if(NULL == fp){

    perror("fopen error\n");
    return 1;
  }
  const char *msg = "hello world!\n";
  fwrite(msg,strlen(msg),1,fp);

  fclose(fp);

  return 0;
}
